package cn.han.oop;

import java.util.Arrays;

public class TestStudent {
    public static void main(String[] args) {
        //1.使用无参构造创建对象
        Student student = new Student();

        //1.2通过set给对象的所有属性赋值
        student.setId(1);
        student.setGender('男');
        student.setName("林冲");
        student.setSubject("CGB");
        student.setAddress("庙里");
        student.study();
        student.eat(3);
        System.out.println(student.sleep());
        student.show();
        //2.1使用全参构造创建对象
        Student student1 = new Student(2,"李逵",'男',"猪肉铺","ACT");
        student1.study();
        student1.eat(10);
        System.out.println(student1.sleep());
        student1.show();
    }
}
